/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package univalle.eisc.pais.ai.searcheslab.model;

import java.util.Stack;

/**
 *
 * @author vivancu
 */
public class Route {

    private Stack<Node> steps = new Stack<Node>();

    public void addStep(Node step) {
        steps.push(step);
    }
    
    public void append ( Route other ){
        steps.addAll(other.getSteps());
    }

    public Stack<Node> getSteps() {
        return steps;
    }

    public void print() {
        System.out.println("******* ROUTE ********");  
        
        System.out.println("Costo: "+ steps.get(0).getCost());
//        for (Node node : steps) {
//            System.out.println(node);
//        }
//        
        for (int i = steps.size() -1; i >= 0; i--) {
            Node node = steps.get(i);
            System.out.println(node);
        }
        

    }
}
